package com.monitoring.application.dto;

import lombok.Data;
import java.time.LocalDateTime;

@Data
public class SensorDTO {
    private Long id;
    private String name;
    private String location;
    private String type;
    private boolean active;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    // 用于创建新传感器的静态方法
    public static SensorDTO createNew(String name, String location, String type) {
        SensorDTO dto = new SensorDTO();
        dto.setName(name);
        dto.setLocation(location);
        dto.setType(type);
        dto.setActive(true);
        return dto;
    }
}
